using MinimalistFoodStreet.BackEnd.Infrastructure.EFCore;
using MinimalistFoodStreet.BackEnd.Infrastructure.Dtos.Response.Tables;
using MinimalistFoodStreet.BackEnd.Infrastructure.Tools;

namespace MinimalistFoodStreet.BackEnd.Server.Server.ResponseExtend.Tables 
{
	public static class DictionaryTypesEnitityExtend 
	{
		public static ResponseDictionaryTypesDto ToResponseDto(this DictionaryType entity)
		{
			return new ResponseDictionaryTypesDto ()
			{

					id = entity.DtId,
					name = entity.DtName,
					key = entity.DtKey,
					description = entity.DtDescription,
					createTime = entity.DtCreateTime,
					createTimeStr = Tools.TimeToString(entity.DtCreateTime),
					updateTime = entity.DtUpdateTime,
					updateTimeStr = Tools.TimeToString(entity.DtUpdateTime),
			};
		}
	}
}